#ifndef _ROTATE_H_
#define _ROTATE_H_
typedef struct ControlCenter ControlCenterTypeDef;//前置声明
typedef enum {
  HN_Rotate,
  HL_15,
  HL_30,
  HL_45,
  HL_60,
  HL_75,
  HL_90,
  HL_100,
  HL_135,
  HL_140,
  HL_180,
  HR_15,
  HR_30,
  HR_45,
  HR_60,
  HR_70,
  HR_75,
  HR_90,
  HR_135,
  HR_150,
  H_trace_r,
  H_trace_l,
  HL_ARC_15,
  HR_ARC_15,
  HL_ARC_20,
  HR_ARC_20,
  HL_ARC_30,
  HR_ARC_30,
  HL_ARC_45,
  HR_ARC_45,
  HL_ARC_90,
  HR_ARC_90,
  HL_ARC_110,
  HR_ARC_150,
  HR_ARC_160,
  HL_ARC_150,
  HL_ARC_120,
  HL_ARC_130,
  HR_ARC_120,
} RotateType;
typedef enum {Left,Right}Direction;
#include <stdint.h>
void rotateHandle_Task(ControlCenterTypeDef* control);
float yawAngleAverage(float angle[], uint8_t size, uint8_t mode);
uint8_t rotAngleCommon(float angle, Direction direction);
uint8_t rotAnglePlatform(float angle, Direction direction);
uint8_t rotAnglePlatform_ONE(float angle,Direction direction);
float calculateYawAngle(float curYaw, float angle);
float errCalculate(float curYaw, float targetYaw,Direction direction);
#endif // !

